#!/usr/bin/env python
# -*- coding: utf-8 -*-

#作者: 赖勇浩
#日期: 2007-06-27
#参考Mixin 扫盲班编写
#http://blog.csdn.net/lanphaday/archive/2007/06/18/1656969.aspx
class Fruit(object):
	pass
class GiftMixin(object):
	def is_gift_fruit(self):
		return True
class NotGiftMixin(object):
	def is_gift_fruit(self):
		return False
class PareMixin(object):
	def eat_method(self):
		return 'Pare'
class HuskMixin(object):
	def eat_method(self):
		return 'Husk'
class Apple(GiftMixin, PareMixin, Fruit):pass
class Orange(GiftMixin, HuskMixin, Fruit):pass
class Pear(NotGiftMixin, PareMixin, Fruit):pass
class Banana(NotGiftMixin, HuskMixin, Fruit):pass
if __name__ == '__main__':
	f=Apple()
	print "食用方法 %s"%f.eat_method()
	print "是否设和送礼%s"%f.is_gift_fruit()